-- GENERATED SPELL FOR [Vile Priestess Hexx] --


function spell0_7995(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(11642,pUnit)
pUnit:RegisterEvent('Sorts_7995', 3500, 1)
end

function spell1_7995(pUnit, Event) --@Hex,n/a--
pUnit:FullCastSpellOnTarget(11641,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7995', 10271, 1)
end

function spell2_7995(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(11639,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7995', 18000, 1)
end

function Sorts_7995(pUnit, Event)
local choix_sorts_7995 = math.random(0, 2)
if choix_sorts_7995 == 0 then
pUnit:RegisterEvent('spell0_7995', 1, 1)
end
if choix_sorts_7995 == 1 then
pUnit:RegisterEvent('spell1_7995', 1, 1)
end
if choix_sorts_7995 == 2 then
pUnit:RegisterEvent('spell2_7995', 1, 1)
end
end

function mob7995_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7995', math.random(1500, 3000), 1)
end

function mob7995_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7995_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7995_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7995, 1, 'mob7995_Action')
RegisterUnitEvent(7995, 2, 'mob7995_Leave')
RegisterUnitEvent(7995, 3, 'mob7995_Kill')
RegisterUnitEvent(7995, 4, 'mob7995_Die')
